Various embodiments described herein relate to computer software, and in particular to systems and methods for servicing server event buffers such as a HTTP event server.
Is desirable for HTTP servers to efficiently process a high volume of events received through connections to client sockets, such as Internet web browsers, on client terminals. Connection-oriented HTTP servers handle parallel connections by allocating a different processing thread to each of the connections. Each thread is responsible for the complete process of executing and responding to all events received through a particular one of the connections.
In contrast, event-driven HTTP servers process data received, on a connection or data arriving into a buffer to be sent on a connection, by triggering a callback function which services that data. These callback functions are all executed by a single thread. Consequently, as the number of connections increases, the resources of the server that are needed to handle such callback functions increases less rapidly. Furthermore, idle connections may consume almost no resources, in contrast to a thread of the connection-oriented HTTP server allocated to handle a presently idle connection. Idle connections can commonly occur in HTTP/1.1 where keep-alive connections are a default. However, single threaded processing of events results in inefficient low bandwidth throughput on multi-core processors.